/*
package com.zhishu.maker.generator.file;


import freemarker.template.TemplateException;

import java.io.File;
import java.io.IOException;

*/
/**
 * @Author: 止束
 * @Version: 1.0
 * @DateTime: 2025/1/9 14:09
 * @Description:
 *//*

public class FileGenerator {
    public static void doGenerator(DataModel dataModel) throws TemplateException, IOException {
        //1. 生成静态文件
        //获取项目路径
        String projectPath = System.getProperty("user.dir");
        System.out.println(projectPath); //D:\Study\Code\Project\代码生成器平台\zhishu-generator-maker
        String projectPathFather = new File(projectPath).getParentFile().toString();
        //输入路径
        String inputPath = projectPathFather + File.separator + "zhishu-generator-demo-projects" + File.separator + "acm-template";
        //输出路径
        String outputPath = projectPathFather;
        //复制
        StaticFileGenerator.copyFilesByHutool(inputPath, outputPath);

        //2. 生成动态文件
        String dynamicProjectPath = projectPath;
        String dynamicInputPath = dynamicProjectPath + File.separator + "src/main/resources/templates/MainTemplate.java.ftl";
        String dynamicOutputPath = outputPath + File.separator + "acm-template" + File.separator + "src/com/zhishu/acm/MainTemplate.java";
        DynamicFileGenerator.doGenerate(dynamicInputPath, dynamicOutputPath, dataModel);
    }
}
*/
